cc.Class({
    extends: cc.Component,
    properties: {
        appid: "",
        iconImageArray: {
            default: [],
            type: cc.SpriteFrame
        }
    },
    onLoad: function () {
        this.initIconArray();
    },
    initIconArray: function () {
        var t = this;
        this.iconArray = [], ["小游戏APPID", "小游戏APPID", "小游戏APPID", "小游戏APPID", "小游戏APPID", "小游戏APPID", "小游戏APPID", "小游戏APPID", "小游戏APPID"].forEach(function (e, n) {
            var o = {
                appid: e,
                spriteFrame: t.iconImageArray[n]
            };
            t.iconArray.push(o);
        });
    },
    start: function () {
        this.startID = 0, this.target = this.node.getComponent("cc.Sprite");
        var t = cc.spawn(cc.scaleTo(1.5, 1.1), cc.rotateTo(1.5, -30)),
            e = cc.spawn(cc.scaleTo(1.5, .9), cc.rotateTo(1.5, 30)),
            n = cc.sequence(t, e, cc.callFunc(function () {
                this.iconArray.length > 0 && (this.startID++, this.startID = this.startID % this.iconArray.length,
                    this.target.spriteFrame = this.iconArray[this.startID].spriteFrame);
            }, this));
        this.node.runAction(cc.repeatForever(n));
    },
    btn: function () {
        if (console.log("立即试玩"), this.iconArray.length > 0) {
            var t = this.iconArray[this.startID].appid;
            wx.navigateToMiniProgram && wx.navigateToMiniProgram({
                appId: t,
                path: ""
            });
        }
    }
})